#include "LDAP_Result.h"

LDAP_Result::LDAP_Result(char *ras,bool s)
{
	raspuns=new char[strlen(ras)+1];
	if(raspuns==0)
		throw new exception();
	strcpy(raspuns,ras);
	Succes=s;
}


LDAP_Result::~LDAP_Result(void)
{
	delete[] raspuns;
}

LDAP_Result::LDAP_Result(const LDAP_Result& result)
{
	raspuns=new char[strlen(result.raspuns)+1];
	if(raspuns==0)
		throw new exception();

	strcpy(raspuns,result.raspuns);
}

LDAP_Result& LDAP_Result::operator=(const LDAP_Result& result)
{
	if(this!=&result)
	{
		delete[] raspuns;
		raspuns=new char[strlen(result.raspuns)+1];
		if(raspuns==0)
			throw new exception();
		strcpy(raspuns,result.raspuns);
	}
	return (*this);
}

